<template>
  <div class="home">
    <!-- 轮播图 -->
    <Swipe></Swipe>
    <!-- 声明式导航 -->
    <div class="nav">
      <div class="title">
        <router-link to="playing"><span>正在热映</span></router-link>
        <router-link to="willplay"><span>即将上映</span></router-link>
      </div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import Swipe from "@/components/Swipe.vue";

export default {
  name: "Home",
  data() {
    return {
    }
  },
  components: { Swipe },
  mounted(){
// 获取热映电影列表
    this.$store.dispatch("getPlayingAction");
  },
  methods:{
  }
};
</script>

<style lang="less" scoped>
.home {
  .nav {
    .title {
      padding: 20px;
      font-size: 16px;
      display: flex;
      border-bottom: 1px solid #ccc;
      justify-content: space-around;
      a {
        color: black;
      }
    }
  }
}
</style>